\documentclass[10pt,oneside]{book}

\input{macros_orig.tex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}

\pagestyle{empty}
\thispagestyle{empty}

\begin{codebox}
  \Procname{$\proc{Mini-Batch-SGD}$(NN, data, k)}
  \li     $n = $ length(data)
  \li     \While not done:
        \Do
  \li        $\proc{Random-Shuffle}$(data)
  \li        \For $i \gets 1$ \To $\lceil n/k \rceil$
           \Do
  \li           $\proc{Batch-Gradient-Update}$(NN, data$[(i - 1)k:ik]$)
           \End
	\End
\end{codebox}

\end{document}
